import React, { Fragment } from "react";
import VisuallyHidden from "./VisuallyHidden";

interface ILinkIconProps {
    Icon: React.ComponentType<React.SVGProps<SVGSVGElement>>;
    title: string;
}

const LinkIcon = ({Icon, ...props}: ILinkIconProps) => (
    <Fragment>
        <Icon aria-hidden='true' />
        <VisuallyHidden>{props.title}</VisuallyHidden>
    </Fragment>
);

export default LinkIcon;
